package com.cheer.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cheer.entity.ReferenceSpecialEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 特殊推荐表
 * 
 * @author chufangzheng
 * @email 1280251739@qq.com
 * @date 2022-02-27 13:50:07
 */
@Mapper
public interface ReferenceSpecialDao extends BaseMapper<ReferenceSpecialEntity> {

    default List<ReferenceSpecialEntity> listByAccountId(Long accountId, String yyyy){

        QueryWrapper<ReferenceSpecialEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(ReferenceSpecialEntity::getVintage, yyyy).eq(ReferenceSpecialEntity::getAccountId, accountId);

        return selectList(queryWrapper);
    }
}
